Flash memory devices are becoming increasingly important for embedded systems because such memory devices have many attractive features, including small size, fast access speeds, shock resistance, and low weight. In some instances, a NAND flash memory may only allow write-after-erase operations, and re-write operations are not permitted. To improve write performance, a logical block address location is mapped to different physical locations inside of the NAND flash memory. However, this can introduce redundant data that has been overwritten but still occupies physical space within the NAND flash memory. Such redundant data is sometimes referred to as “garbage.”
In some instances, a garbage collection operation is performed to remove the redundant data. In general, garbage collection requires a long time due to a long programming time of the NAND flash memory. In a particular example, a typical garbage collection operation copies valid data page-by-page to another free location and then erases the freed block. In general, copying of each page takes time, and each block typically includes 64 pages of data (128 kilobytes of data). In general, the time needed to free a block of data is dependent on the particular system. In a particular example, given the time to copy a page and given the number of pages to be copied, a particular embodiment of a system can include a flash memory that has a garbage collection rate of about 6.4 megabytes per second. In this instance, the garbage collection operations may be slow as compared to a host-to-device transfer rate of the system. In a particular example, a system can have a host-to-device transfer rate of 66 megabytes per second or more. Hence, a garbage collection operation can be much slower than transfer operations and can decreases the overall performance of the system. Further, a garbage collection operation consumes power for each page of data that is to be removed. When a power supply is limited (such as with a battery power supply), garbage collection at a particular point in time may consume too much power for the particular operating conditions of the device.